package city.spring.modules.work.vo;

import city.spring.modules.work.entity.WorkPlanEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author HouKunLin
 * @date 2020/6/4 0004 16:46
 * @see city.spring.modules.work.entity.WorkPlanEntity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class WorkPlanVO extends WorkPlanEntity {
    /**
     * 该方案关联的上班时间段（班次）
     */
    private List<WorkPlanShiftVO> shifts;
    /**
     * 该方案关联的人员列表信息
     */
    private List<WorkPlanUserVO> users;

    public WorkPlanVO(WorkPlanEntity entity) {
        super.setId(entity.getId());
        super.setWorkingDay(entity.getWorkingDay());
        super.setTitle(entity.getTitle());
        super.setVersion(entity.getVersion());
        super.setGmtCreated(entity.getGmtCreated());
        super.setGmtModified(entity.getGmtModified());
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
